<?php

class PhpDbQueryException extends Exception
{
    public function __construct($statement,$params,$msg)
    {
        $phpdbs = array();

        $nbpi = substr_count($statement,'?');
        $nbps = count($params);
        if($nbpi != $nbps)
            $phpdbs[] = 'PhpDbNotice> Le nombre de param&egrave;tres fournis ('.$nbps.') n\'est pas celui attendu ('.$nbpi.')';

        if(count($phpdbs))
            $msg = array_merge($phpdbs,(array)$msg);

        parent::__construct($msg);
    }
}

?>
